home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_316 / life / readme < prev    next >
Text File  |  1992-05-06  |  6KB  |  150 lines

  1. And again.  Speeds up assembly another 15%.  Try
  2.  
  3.     life -r25 -t -h64 -v50 xmp/r
  4.  
  5. for kicks.  (Add -a if you have a 68020 or 68030.)
  6.  
  7. And another version.  Adds torus option to assembly version.  Fixes
  8. a couple of minor things.
  9.  
  10. Yet another version.  This one adds the `-a' option which means use the
  11. processor instead of the blitter for the LIFE calculations.  Makes things
  12. run faster on 68020 and 68030 Amigas.
  13.  
  14. This is a new version of my ancient LIFE program, significantly hacked and
  15. added to.  It is by no means in a final state, but it since no one else has
  16. presented a nice LIFE environment, it will have to do.  Some example input
  17. files have been provided as well, in a new (not another!) macro language
  18. that I hacked together one day many days ago.  It requires operation from
  19. the CLI.
  20.  
  21. First, let's run it.  Simply change directories to the life directory on
  22. the disk, and type, for instance,
  23.  
  24.     life xmp/r
  25.  
  26. That's all there is to it!  Hit Q, ESC, X, or ^C to exit.  Some other
  27. sample command lines are:
  28.  
  29.     life -h xmp/acorn
  30.     life -o -t -p2 xmp/bomb
  31.     life -r100 -h xmp/bcity  ; be patient!
  32.  
  33. The rest of this documentation has three parts:  an explanation of the
  34. command line arguments, an explanation of the keyboard command keys during
  35. the run of the program, and an explanation of the macro language.  This
  36. is the usage line of the program.  Note that all parameters must not be
  37. separated from their option letter by a space; use -h352 instead of -h 352.
  38.  
  39.     life [-h[n]] [-r[n]] [-pn] [-o] [-t] [-v[n]] [-s] [infile]
  40.  
  41. -h    This option sets hires mode.  The optional parameter sets the
  42.     horizontal resolution to something other than 640; it must be
  43.     a multiple of 16.  Actually, if the parameter is less than 400,
  44.     low res is assumed.
  45.  
  46. -r    Set a cell randomly every generation.  If a parameter is supplied,
  47.     it indicates how long to delay in generations before setting each
  48.     cell; -r10 sets a random cell every 10 generations.
  49.  
  50. -p    Set the number of bitplanes to use.
  51.  
  52. -o    Orify; this option allows cells to leave `tracks', so you can trace
  53.     the glider guns and the like.  You *must* use at least -p2 with this
  54.     option.
  55.  
  56. -t    Wrap the screen as in a torus.
  57.  
  58. -v    Set the vertical resolution.  If the supplied parameter is greater
  59.     than 300, the screen is set to interlace.
  60.  
  61. -s    Do not start computing until the appropriate keyboard key is hit.
  62.  
  63. Which brings us to the keyboard command options.  These keys should be hit
  64. during the programs execution.
  65.  
  66. Q, X,    Exit the program.  Because the explanation is so simple but there
  67. ^C, ESC    are so many keys, I need to add this nonsense sentence so the docs
  68.     documentation looks pretty.
  69.  
  70. 0, G    Go!  Run at full speed.
  71.  
  72. S    Stop.  Wait for one of the keystroke commands to continue.
  73.  
  74. SPACE    Execute a single generation and then stop.  Useful for single-stepping.
  75.  
  76. 1, 2,    Insert a delay between generations; slow things down enough so you
  77. 3, 4,    can watch comfortably.  The actual delay inserted can be calculated
  78. 5, 6,    by the formula (2^n)/50, in seconds, where n is the key pressed.
  79. 7, 8,    This allows delays from 1/25 of a second between generations, all the
  80. 9    way to 10.24 seconds between generations.
  81.  
  82. Ahh, now we get to the hard part, documenting the macro language which is
  83. used to set up initial generations.  This command language is based somewhat
  84. on Logo (remember multitasking Color Computer Logo?)  All whitespace is
  85. ignored.  All caps are converted to lowercase.  Comments are enclosed in
  86. < and >.  The turtle starts in the middle of the screen, facing up, with
  87. the pen down.  The basic commands are:
  88.  
  89. f    Move forward one cell, setting the current cell if the pen is down.
  90. r    Turn towards the right.
  91. l    Turn towards the left.
  92. b    Turn facing the other direction.
  93. u    Lift the pen off the paper.
  94. d    Put the pen on the paper.
  95.  
  96. The commands take a single argument, as well.  For instance,
  97.  
  98.     10 f
  99.  
  100. moves forward 10 times, setting cells if the pen is down.
  101.  
  102. Parentheses group actions, which can be repeated.  For instance,
  103.  
  104.     10 ( f r f l )
  105.  
  106. with the pen down draws a staircase pattern, by moving forward, then right,
  107. then forward, then left, 10 times.  This grouping is nestable.
  108.  
  109. x    Go to the x location supplied as a parameter.
  110. y    Go to the y location supplied as a parameter.
  111. -    Flip left and right.  If executing again, things go back to normal.
  112. +    Make right be the normal right, undoing any effects of the above.
  113. .    Move forward without setting any cells, ignoring the current pen.
  114. *    Move forward, setting the current cell, ignoring the current pen.
  115.  
  116. Brackets ([]) push and pop a location stack.  The things saved and restored
  117. are the x and y location, the direction, whether `right' means a real right
  118. or a left (from the - command), and the pen state.  Thus, you can do things
  119. like:
  120.  
  121.     10 ( [ 10 * ] r . l )
  122.  
  123. to draw a 10 by 10 filled block.  That `r . l' sequence occurs often enough
  124. that the command `,' is used for it.  This way, you can draw pictures in
  125. your editor.  To draw a glider, you might use:
  126.  
  127.     [.*.],
  128.     [..*],
  129.     [***]
  130.  
  131. Easy enough, eh?  One last thing.  You can even define single-character
  132. macros!  If you use that glider often enough, you can make it a macro by
  133. simply using the `=' command.  You must assign it to something grouped in
  134. parenthesis.  So,
  135.  
  136. = g ( [
  137.    [.*.],
  138.    [..*],
  139.    [***]
  140.    ] )
  141.  
  142. sets `g' to be a glider macro.  Each time you use g in your script file, a
  143. glider will be drawn.  Note that it is good practice to enclose your macro
  144. definitions with [ and ], hence the brackets above.
  145.  
  146. There is a handful of examples provided.  No apologies are made for the
  147. cryptic command language or the single character macros supplied.
  148.  
  149. Enjoy!  Bugs to Tomas Rokicki, Box 2081, Stanford, CA  94309.
  150.